import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 高生平
 * Date: 2025-11-10
 * Time: 12:17
 */
public class Test {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str1 = scanner.nextLine();
        String str2 = scanner.nextLine();
        List<Character> ret = comparison(str1, str2);
        for(char ch: ret) {
            System.out.print(ch);
        }
        System.out.println();
        //或者用迭代器
        Iterator<Character> ch2 = ret.listIterator();
        while (ch2.hasNext()) {
            System.out.print(ch2.next());
        }
    }

    public static List<Character> comparison(String str1, String str2) {
        List<Character> list = new ArrayList<>();

        for(int i = 0; i < str1.length(); i++) {
            if(!str2.contains(str1.charAt(i) + "")) {
                list.add(str1.charAt(i));
            }
        }

        return list;
    }
}
